home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / C for beginners.adf / source / key.c < prev    next >
C/C++ Source or Header  |  1978-01-17  |  375b  |  21 lines

  1. /* key.c 12.2 */
  2. void key(string)  /* Without Return value: void */
  3. char string[80];
  4. {
  5.    int i;
  6.    for(i = 0; string[i] > 0; i++)
  7.      printf("%c", string[i] + 1); /* From 'A' make 'B' */
  8. }
  9.  
  10. void main()
  11. {
  12.    char text[81];
  13.    void key();
  14.  
  15.    printf("\n\nPlease input some text!\n");
  16.    scanf("%80s", text);
  17.    key(text);
  18.    printf("\nin the original it was %s\n", text);
  19. }
  20.  
  21.